package com.wicket.okrbff.web.contorller;

import cn.hutool.core.bean.BeanUtil;
import com.wicket.okrbff.biz.service.CustomExecutionCycleService;
import com.wicket.okrbff.biz.service.dto.req.*;
import com.wicket.okrbff.biz.service.dto.res.*;
import com.wicket.okrbff.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.wicket.okrapp.integration.FwAppCustomExecutionCycleClient;
import com.wicket.okrapp.integration.dto.ObtainParentTargetContActualWorkTimeRespDto;
import com.wicket.okrapp.integration.dto.ObtainParentTargetContActualWorkTimeReqDto;
import com.wicket.okrbff.common.exception.Assert;
import com.wicket.okrapp.integration.dto.ObtainTargetContPlanWorkTimeRespDto;
import com.wicket.okrapp.integration.dto.ObtainTargetContPlanWorkTimeReqDto;
import com.wicket.okrbff.biz.service.dto.common.BffTargetContPlanWorkTimeDto;
import java.util.stream.Collectors;
import com.wicket.okrapp.integration.dto.SetTargetContActualWorkTimeEtcRespDto;
import com.wicket.okrapp.integration.dto.SetTargetContActualWorkTimeEtcReqDto;
import com.wicket.okrapp.integration.dto.TargetContPlanWorkTimeDto;
import cn.hutool.core.collection.CollectionUtil;
import com.wicket.okrapp.integration.FwAppTargetCycleClient;
import com.wicket.okrapp.integration.dto.BatchQueryEvaObjTargetCycleRespDto;
import com.wicket.okrapp.integration.dto.BatchQueryEvaObjTargetCycleReqDto;
import com.wicket.okrapp.integration.FwAppExecuteProgressClient;
import com.wicket.okrapp.integration.dto.ImplementExecuteProgressOperationJudgeComRespDto;
import com.wicket.okrapp.integration.dto.ImplementExecuteProgressOperationJudgeComReqDto;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Api(value = "CustomExecutionCycle", tags = { "CustomExecutionCycle" })
@RestController
// @RequestMapping("/oms/customExecutionCycle/")
public class CustomExecutionCycleController {

  @Autowired
  CustomExecutionCycleService customExecutionCycleService;
/**
   * B3获取上级目标内容实际工作起止时间(管理)
   * gen by moon at 5/21/2023, 7:12:41 AM
   */
    @PostMapping("/oms/mgt/customExecutionCycle/obtainParentTargetContActualWorkTime")
    @ApiOperation(value = "B3获取上级目标内容实际工作起止时间(管理)", response = OkrResult.class)
    public OkrResult<BffObtainParentTargetContActualWorkTimeRespDto> obtainParentTargetContActualWorkTime(@RequestBody(required=false) @Validated BffObtainParentTargetContActualWorkTimeReqDto reqDTO){
        return OkrResult.success(customExecutionCycleService.obtainParentTargetContActualWorkTime(reqDTO));
    }
/**
   * B3获取目标内容计划工作时间(管理)
   * gen by moon at 5/21/2023, 7:28:19 AM
   */
    @PostMapping("/oms/mgt/customExecutionCycle/obtainTargetContPlanWorkTime")
    @ApiOperation(value = "B3获取目标内容计划工作时间(管理)", response = OkrResult.class)
    public OkrResult<BffObtainTargetContPlanWorkTimeRespDto> obtainTargetContPlanWorkTime(@RequestBody(required=false) @Validated BffObtainTargetContPlanWorkTimeReqDto reqDTO){
        return OkrResult.success(customExecutionCycleService.obtainTargetContPlanWorkTime(reqDTO));
    }
/**
   * B3设置目标内容实际工作起止时间等(管理)
   * gen by moon at 5/21/2023, 7:28:22 AM
   */
    @PostMapping("/oms/mgt/customExecutionCycle/setTargetContActualWorkTimeEtc")
    @ApiOperation(value = "B3设置目标内容实际工作起止时间等(管理)", response = OkrResult.class)
    public OkrResult<BffSetTargetContActualWorkTimeEtcRespDto> setTargetContActualWorkTimeEtc(@RequestBody(required=false) @Validated BffSetTargetContActualWorkTimeEtcReqDto reqDTO){
        return OkrResult.success(customExecutionCycleService.setTargetContActualWorkTimeEtc(reqDTO));
    }
}
